<template>
	<base-breadcrumb>
		<template>
			<div class="table-page-search-wrapper">
				<TitleName title="施组(方案)审批计划"></TitleName>
				<a-form>
					<a-row :gutter="24">
						<a-col :md="8" :sm="8">
							<a-form-item label="打分表名称" 
							:labelCol="{ lg: { span: 7 }, sm: { span: 7 } }" 
							:wrapperCol="{ lg: { span: 17 }, sm: { span: 17 } }">
								<BaseInput v-model="queryParam.projectName" />
							</a-form-item>
						</a-col>
						<a-col :md="8" :sm="8">
							<a-form-item label="所属分类" 
							:labelCol="{ lg: { span: 6 }, sm: { span: 6 } }" 
							:wrapperCol="{ lg: { span: 16 }, sm: { span: 16 } }">
								<a-select @select="handleChange" placeholder="请选择">
									<a-select-option value="0">科技部-技术部</a-select-option>
									<a-select-option value="1">安监部</a-select-option>
									<a-select-option value="2">商务部门</a-select-option>
								</a-select>
							</a-form-item>
						</a-col>
						<a-col :md="8" :sm="8">
							<span class="table-page-search-submitButtons">
								<a-button type="primary" @click="addSearch">搜索</a-button>
								<a-button style="margin-left: 8px" @click="addEmpty">重置</a-button>
								<a @click="toggleAdvanced" style="margin-left: 8px">
									{{ advanced ? '收起' : '展开' }}
									<a-icon :type="advanced ? 'up' : 'down'" />
								</a>
							</span>
						</a-col>
					</a-row>
					<div v-if="advanced">
						<a-row :gutter="24">
							<a-col :md="8" :sm="8">
								<a-form-item label="上传人" 
								:labelCol="{ lg: { span: 5 }, sm: { span: 5 } }" 
								:wrapperCol="{ lg: { span: 17 }, sm: { span: 17 } }">
									<BaseInput placeholder="" v-model="queryParam.vompletedBy" />
								</a-form-item>
							</a-col>
							<a-col :md="8" :sm="8">
								<a-form-item label="上传时间" 
								:labelCol="{ lg: { span: 5 }, sm: { span: 5 } }" 
								:wrapperCol="{ lg: { span: 17 }, sm: { span: 17 } }">
									<a-range-picker @change="WriteTime" />
								</a-form-item>
							</a-col>
						</a-row>
					</div>
				</a-form>
			</div>
		</template>
		<a-card>
			<div class="table-operator">
				<a-button @click="add">新增打分表</a-button>
			</div>
			<a-table :data-source="dataSource" :columns="columns" bordered>
				<span slot="description" slot-scope="text">
					<ellipsis :length="8" tooltip>{{ text }}</ellipsis>
				</span>
				<span slot="serial" slot-scope="text, record, index">{{ index + 1 }}</span>
				<!-- 操作 -->
				<span slot="operation" slot-scope="text, record">
					<template>
						<a @click="addSee(record)">查看</a>
						<a-divider type="vertical" />
						<a @click="addEdit(record)">编辑</a>
						<a-divider type="vertical" />
						<a @click="addEdit(record)">删除</a>
					</template>
				</span>
			</a-table>
		</a-card>
	</base-breadcrumb>
</template>

<script>
	import TitleName from '@/components/TitleName/index.vue'
	const columns = [
		{
			title: '序号',
			width: '80px',
			scopedSlots: { customRender: 'serial' }
		},
		{
			title: '打分表名称',
			dataIndex: 'projectName'
		},
		{
			title: '方案分类',
			dataIndex: 'timeForComplation'
		},
		{
			title: '上传人',
			dataIndex: 'branchCompany'
		},
		{
			title: '上传时间',
			dataIndex: 'vompletedBy'
		},
		{
			title: '操作',
			dataIndex: 'operation',
			width: '170px',
			scopedSlots: { customRender: 'operation' }
		}
	];
	const dataSource = [
		{
			projectName:1111,
			timeForComplation:2222,
			branchCompany:33333,
			vompletedBy:44444,
			status:1,
			fillingInTime:5555555
		}
	]
	export default{
		components:{
			TitleName
		},
		data(){
			this.columns = columns
			this.dataSource = dataSource
			return{
				queryParam:{},
				advanced:false
			}
		},
		methods:{
			addEdit() {},
			addSee() {},
			addEmpty() {},
			addSearch() {},
			handleChange() {},
			toggleAdvanced(){
				this.advanced = !this.advanced
			},
			add(){
				this.$router.push('/technical/ShiGroup/addScoringTable')
			}
		}
	}
</script>

<style>
</style>
